#include "controller.h"
#include <daisy\FrameworkBase.h>
#include "windows.h"
INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
{
	using namespace DAISY;

	
	SystemPtr system(new SystemList<boost::mpl::list<SimpleTimerManager,OgreGraphicsManager,OISInputManager,OgreNewtManager,FmodSoundManager,PluginsManager>>());

	LogicConfiger::LogicFacadePtr logic(new LogicConfiger::LogicFacade());
	LogicConfiger::ManualBuilder builder; 
	builder.addPlugin("Model");
	builder.setTheater("TheaterBase","defaultTheater");
	builder.addDirector("DirectorBase","defaultDirector");
	builder.setActiveDirector("defaultDirector");
	logic->building(builder);
	

	if(system->init())
	{
		if(logic->load())
		{
			system->run();
			logic->unload();
		}

		system->shutdown();
	}
	
	
	return 0;
}
	